﻿@model Jb.Web.ViewModels.UtilityModels.ListConfig
@using Jb.Web.Utility;
@{    
	String pageTitle = "Category List";
    ViewBag.Title = Html.GetPageTitle(pageTitle);
    ViewData[AppConstants.ViewDataKeys.SELECTED_MENU] = AdminMenu.ManageCategory;    
	
	///Bind Category ListConfig	
    String editUrlFormat = Url.AdminUrl("Edit", "Category") + "/{0}";
    Jb.Web.ViewModels.UtilityModels.ListConfig _ListConfig = Jb.Web.ViewModels.UtilityModels.ListConfig.Build(
        @"Info{ ID | Name | ParentID }, 
        Details{Description | PropertyDefinition}",
        Model.DataSource, true, editUrlFormat);
    _ListConfig.ShowFieldName = true;
    _ListConfig.MakeFieldNameBold = true;
}
<div class="jb-page-heading">
    <h1>@pageTitle</h1>
    <div>
        Add/Edit and manage Category.
    </div>
</div>
<div class="jb-page-content">    
    <a href="@Url.AdminUrl("Edit", "Category")">Add New Category</a>
    @Html.Partial("_ListView", _ListConfig)
    @if (Model.Pager != null)
    {    
        @Html.Partial("_Pager", Model.Pager)
    }
</div>

    


